# CMakeList.txt: MyCommon 的 CMake 项目，在此处包括源代码并定义
# 项目特定的逻辑。
#
cmake_minimum_required (VERSION 3.8)
project(my-msleep)

option(IS_WINDOWS OFF)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
	set(IS_WINDOWS ON)
endif()

# 添加三方库依赖
if(IS_WINDOWS)
    add_definitions(-D_WINDOWS)
endif()

# add_library(${PROJECT_NAME} SHARED)
add_executable(msleep
    msleep.cpp
)

# Windows下用Visual Studio得这么安装复制文件
if (IS_WINDOWS)
	

	# add_custom_command(
	# 	TARGET
	# 		${PROJECT_NAME}
	# 	POST_BUILD
	# 		COMMAND
	# 			${CMAKE_COMMAND} -E copy ${EXEDEMO_INCLUDE} ${WORKSPACE_PATH}/include
	# 		COMMAND
	# 			${CMAKE_COMMAND} -E copy ${PROJECT_NAME}.dll ${WORKSPACE_PATH}/lib
	# 		COMMAND
	# 			${CMAKE_COMMAND} -E copy ${PROJECT_NAME}.lib ${WORKSPACE_PATH}/lib
	# 	VERBATIM
	# )
endif()

include(GNUInstallDirs)
message(WARNING ${CMAKE_INSTALL_BINDIR})

install(TARGETS msleep
	LIBRARY 
    DESTINATION
	${CMAKE_INSTALL_BINDIR}
    # bin
)
